Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run eventPool heartbeat to wake up waiters in the slow path #685

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vadimalekseev
Copy link
Collaborator

@vadimalekseev vadimalekseev commented Oct 18, 2024

Fixes #684

Before (best of 5):

$ export POOL_LOW_MEMORY=false && go test -bench "BenchmarkLightJsonReadPar" -run ^$ ./plugin/input/file

goos: darwin
goarch: arm64
pkg: github.com/ozontech/file.d/plugin/input/file
BenchmarkLightJsonReadPar-8            1        2235307292 ns/op         649.23 MB/s      224088 B/op       2359 allocs/op
--- BENCH: BenchmarkLightJsonReadPar-8
    file_test.go:1187: Memory used: 249MiB

After (best of 5):

$ export POOL_LOW_MEMORY=true && go test -bench "BenchmarkLightJsonReadPar" -run ^$ ./plugin/input/file

goos: darwin
goarch: arm64
pkg: github.com/ozontech/file.d/plugin/input/file
BenchmarkLightJsonReadPar-8            1        1841799875 ns/op         787.94 MB/s     1192072 B/op       2224 allocs/op
--- BENCH: BenchmarkLightJsonReadPar-8
    file_test.go:1150: using low memory pool
    file_test.go:1187: Memory used: 90MiB

@vadimalekseev vadimalekseev force-pushed the 684-events-starvation-deadlock branch 2 times, most recently from c8108fe to 957c23c Compare October 18, 2024 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Potential deadlock in case of events starvation
1 participant